using System;
using System.Collections.Generic;
using AutoMapper;
using Illinois.Core.Interfaces;

namespace Illinois.Infrastructure.Models
{
  public class BurnDownData : IBurnDown
  {
    public int Id { get; set; }
    public string Title { get; set; }
    public DateTime Start { get; set; }
    public DateTime End { get; set; }
    public int InitialStoryPoints { get; set; }
    public IList<IStoryPoints> StoryPointsList
    {
      get
      {
        Mapper.CreateMap<StoryPointsData, IStoryPoints>();
        return Mapper.Map<IList<StoryPointsData>, IList<IStoryPoints>>(StoryPointsWrapList);
      }
      set
      {
        //throw new Exception("use StoryPointsWrapList when setting story points data");
      }
    }
    public int ProjectId { get; set; }

    public IList<StoryPointsData> StoryPointsWrapList { get; set; }

    public BurnDownData()
    {
      StoryPointsWrapList = new List<StoryPointsData>();
    }
  }
}
